import Mock from 'mockjs';

export function mock() {
    // 套系商品列表
    Mock.mock(/package/, 'post', {
        status: 0,
        message: 'OK',
        data: [
            {
                id: 3,
                name: '婚纱摄影',
                category: '全家福',
                cover: [
                    'http://www.baidu.com/image.jpg',
                ],
                hot_cover: 'http://www.baidu.com/cover.jpg',
                recommend_cover: 'http://www.baidu.com/cover.jpg',
                selected_cover: 'http://www.baidu.com/selected_cover.jpg',
                display_price: 19000,
                price: 123,
                sales_volume: 23,
                share_number: 2,
                visitor: 2,
            },
        ],
    });

    // 套系详情
    Mock.mock(/package\/detail/, 'get', {
        status: 0,
        message: 'OK',
        data: {
            shop_id: 123,
            name: '婚纱摄影',
            tag: '标签',
            cover: [
                'http://www.baidu.com/image.jpg',
            ],
            hot_cover: 'http://www.baidu.com/cover.jpg',
            recommend_cover: 'http://www.baidu.com/cover.jpg',
            selected_cover: 'http://www.baidu.com/selected_cover.jpg',
            video: 'http:/www.baidu.com/video.mp4',
            modelling: 34,
            photo: 23,
            truing: 12,
            display_price: 19000,
            description: '描述内容',
            price: 123,
            sales_volume: 0,
            share_number: 2,
            visitor: 2,
            service: [
                {
                    name: '造型',
                    value: [
                        { id: 123, name: '新娘服饰', number: 1 },
                        { id: 253, name: '新郎服饰', number: 1 },
                    ],
                },
                {
                    name: '场景',
                    value: [
                        {
                            name: '内景', 
                            desc: '4套'
                        },
                        {
                            name: '外景',
                            desc: '4套',
                        }
                    ],
                },
            ],
            prepay: 123,
        },
    });
    
    // 套系产品规格
    Mock.mock(/package\/spec/, 'get', {
        status: 0,
        message: 'OK',
        data: [
            {
                attr: '相框',
                values: [
                    {
                        id: 123,
                        value: '黄金相框',
                        price: 123,
                        cover: 'http://www.baidu.com/cover.jpg',
                        discount:123,
                        number: 1,
                        is_default: 0,
                        descriptoin: '详情',
                    },
                ],
            },
        ],
    });

    // 海报
    Mock.mock(/package\/poster/, 'get', {
        status: 0,
        message: 'OK',
        data: 'xxx',
    });
}
